package com.AdvancedDemos;

public class Args_Of_Main {
    public static void main(String[] args) {
        /*
        注意与C语言不同
        Args_Of_Main.java China India America Japan Germany Russia
        Java命令行执行时 Args_Of_Main.java 不算字符串,args[0]中存的是China的地址
         */
        for (int i = 0; i < args.length; i++) {
            System.out.println("args[" + i + "] = " + args[i]);
        }

        /*
        F:\IntelijIDEA\IntelliJ IDEA 2020.1.3\IdeaProjects\MyFirstProject\helloworld.app\src\com\AdvancedDemos>java Args_Of_Main.java China India America Japan Germany Russia
        args[0] = China
        args[1] = India
        args[2] = America
        args[3] = Japan
        args[4] = Germany
        args[5] = Russia
        */

    }
}
